# -*- coding: utf-8 -*-
import re
import pymysql.cursors

# 匹配标题
# pattern1 = re.compile(r'(.*[（\(](\d)*-[\d+=]*[）\)])')
pattern1 = re.compile(r'(.*[（\(](\d)*-[\d+=，]*[）\)])')
# 匹配作者名
pattern2 = re.compile(r'([\u4e00-\u9fa5\s]{2,10}\d\).*)')
# 匹配作者信息
pattern3 = re.compile(r'((\d\)[\u4e00-\u9fa5]*).*\d{6}.*)')
# 匹配摘要
pattern4 = re.compile(r'摘要[\s\S]*?关键词')
# 匹配关键词
pattern5 = re.compile(r'关键词.*')


with open('temp.txt','r',encoding='utf-8') as f:
    data=f.read()

result1 = pattern1.findall(data)
result2 = pattern2.findall(data)
result3 = pattern3.findall(data)
result4 = pattern4.findall(data)
result5 = pattern5.findall(data)

print(len(result1))
print(len(result2))
print(len(result3))
print(len(result4))
print(len(result5))